package adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import bean.ListOfPapersBean;
import student.andlei.com.student.R;
import utils.StringUtils;

public class DoTheWorkSelectAdapter extends BaseQuickAdapter<ListOfPapersBean.mList.Questions.Options,BaseViewHolder>{
    public DoTheWorkSelectAdapter(int layoutResId, @Nullable List<ListOfPapersBean.mList.Questions.Options> data) {
        super(layoutResId, data);

    }

    @Override
    protected void convert(BaseViewHolder helper, ListOfPapersBean.mList.Questions.Options item) {
        if(item.isSelect == 1){
            helper.getView(R.id.tv_id).setBackgroundResource(R.drawable.circle_fill);
        }else {
            helper.getView(R.id.tv_id).setBackgroundResource(R.drawable.circle_border);
        }
        helper.setText(R.id.tv_id,item.idx);
        //helper.setText(R.id.tv_content," "+item.text);
    }
}
